<template>
    <div>
        <x-table class="tableBox">
            <tr class="t_list_caption">
                <th width="110">日期</th>
                <th>内容</th>
            </tr>
            <tr class="t_td_text" v-for="(item , index) in infoData" :key="index">
                <td>{{item.date}}</td>
                <td>{{item.message}}</td>
            </tr>
        </x-table>
    </div>
</template>
<script>

    import axios from 'axios'
    import {lotterytype} from '../../../../assets/js/lotterytype.js'
    import { XTable } from 'vux'

    export default {
        name: "News",
        props: {  //普通类型：String、Number、Boolean、Null    引用类型： Array、Object
            
        },
        components: {
            XTable
        },
        data(){
            return{
                infoData: {},
            }
        },
        methods: {
            init(){

                //当前标题
                this.$emit('getTit','消息中心');

                var _this = this;

                this.$httpGet('/api/other/last').then(response => {
                    console.log(response);
                    if(response.status == 200){
                        _this.infoData = response.data;
                    }

                });
            },
            
        },
        mounted(){
            this.init();
        },
        watch: {
            

        },
    }
</script>
<style scoped>
    .tableBox{
        background-color: #fff;
        text-align: center;
        width: 100%;
    }
    .tableBox th{
        background: #e2d4ca;
        border-bottom: 1px solid #c3b1a4;
        border-top: 1px solid #ebe1d9;
        font-size: 12px;
        line-height: 22px;
        font-weight: bold;
    }
    .tableBox tr{
        font-size: 12px;
        line-height: 22px;
    }
    .tdBg{
        background: #f6f1ee;
        padding: 3px 8px;
        font-size: 12px;
    }
    .marginright{
        margin-right: 20px;
    }
    .marginright>i{
        font-style: normal;
    }
    .lineT{
        border-top: 1px solid #dcd1ca;
    }
</style>
